'This class was converted from C# code created by abi.exDream.com to VB.Net 2005/2008 class by Danny C. McNaught

#Region "Imports directives"
Imports System
Imports System.Text
Imports Microsoft.VisualBasic
Imports System.Collections
Imports System.Collections.Specialized
Imports System.Windows.Forms
Imports System.Globalization
Imports System.Diagnostics
#If UNIT_TESTING Then
Imports NUnit.Framework
#End If
#End Region

Namespace VBCodeCommenter

    ''' <summary>The Class String helper
    ''' </summary>
    ''' <remarks>
    ''' 	<para><b>History:</b></para>
    ''' <list type="table">
    ''' 	<listheader>
    ''' 		<term>Term</term>
    ''' 		<description>Description</description>
    ''' 	</listheader>
    ''' 	<item>
    ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:02:56 AM</para></term>
    ''' 		<description>Created XML Comment. </description>
    '''	''' 	</item>
    ''' </list>
    ''' </remarks>
    ''' <example>
    ''' </example>
    Public Class StringHelper
#Region "Constants"
        ''' <summary>Constant Variable [NewLine] As <seealso cref= "System.String"/> = vbCrLf
        ''' </summary>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' 	<item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:03:11 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Const NewLine As String = vbCrLf
#End Region

#Region "Comparing, Counting and Extraction"
        ''' <summary>
        ''' Check if a string (s1, can be longer as s2) begins with another string (s2), only if s1 begins with the same string data as s2, true is returned, else false. 
        ''' <para>The string compare is case insensitive.</para>
        ''' </summary>
        ''' <param name="s1">Parameter s1 As <seealso cref= "System.String"/></param>
        ''' <param name="s2">Parameter s2 As <seealso cref= "System.String"/></param>
        ''' <returns>
        ''' <seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:05:16 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:05:49 AM</para></term>
        ''' 		<description>Updated XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function BeginsWith(ByVal s1 As String, ByVal s2 As String) As Boolean
            Return [String].Compare(s1, 0, s2, 0, s2.Length, True) = 0
        End Function

        ''' <summary>
        ''' Helps to compare strings, uses case insensitive comparison.
        ''' <para>String.Compare is also gay because we have always to check for == 0.</para>
        ''' </summary>
        ''' <param name="s1">Parameter s1 As <seealso cref= "System.String"/></param>
        ''' <param name="s2">Parameter s2 As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:06:53 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function Compare(ByVal s1 As String, ByVal s2 As String) As Boolean
            Return [String].Compare(s1, s2, True) = 0
        End Function
        ' Compare(s1, s2)
        ''' <summary>
        ''' Helps to compare strings, uses case insensitive comparison.
        ''' <para>String.Compare is also gay because we have always to check for == 0.</para>
        ''' <para>This overload allows multiple strings to be checked, if any of</para>
        ''' <para>them matches we are good to go (e.g. ("hi", {"hey", "hello", "hi"})</para>
        ''' <para>will return true).</para>
        ''' </summary>
        ''' <param name="s1">Parameter s1 As <seealso cref= "System.String"/></param>
        ''' <param name="anyMatch">Parameter anyMatch <seealso cref =" system. array" /> As System. string ()</param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:05 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function Compare(ByVal s1 As String, ByVal anyMatch As String()) As Boolean
            For Each match As String In anyMatch
                If [String].Compare(s1, match, True) = 0 Then
                    Return True
                End If
            Next
            Return False
        End Function
        ' Compare(s1, anyMatch)
        ''' <summary>
        ''' Is a specific name in a list of strings?
        ''' </summary>
        ''' <param name="name">Parameter name As <seealso cref= "System.String"/></param>
        ''' <param name="list">Parameter list As <seealso cref= "System.Array"/></param>
        ''' <param name="ignoreCase">Parameter ignoreCase As <seealso cref= "System.Boolean"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:11 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function IsInList(ByVal name As String, ByVal list As ArrayList, ByVal ignoreCase As Boolean) As Boolean
            For Each listEntry As String In list
                If [String].Compare(name, listEntry, ignoreCase) = 0 Then
                    Return True
                End If
            Next
            Return False
        End Function
        ' IsInList(name, list, ignoreCase)
        ''' <summary>
        ''' Is a specific name in a list of strings?
        ''' </summary>
        ''' <param name="name">Parameter name As <seealso cref= "System.String"/></param>
        ''' <param name="list">Parameter list <seealso cref =" system. array" /> As System. string ()</param>
        ''' <param name="ignoreCase">Parameter ignoreCase As <seealso cref= "System.Boolean"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:16 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function IsInList(ByVal name As String, ByVal list As String(), ByVal ignoreCase As Boolean) As Boolean
            For Each listEntry As String In list
                If [String].Compare(name, listEntry, ignoreCase) = 0 Then
                    Return True
                End If
            Next
            Return False
        End Function
        ' IsInList(name, list, ignoreCase)
        ''' <summary>
        ''' Count words in a text (words are only separated by ' ' (spaces))
        ''' </summary>
        ''' <param name="text">Parameter text As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.Int32"/> As System.Int32
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:24 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function CountWords(ByVal text As String) As Integer
            Return text.Split(New Char() {" "c}).Length
        End Function

        ''' <summary>The Function Compare char case insensitive
        ''' </summary>
        ''' <param name="c1">Parameter c1 As <seealso cref= "System.Char"/></param>
        ''' <param name="c2">Parameter c2 As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:34 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function CompareCharCaseInsensitive(ByVal c1 As Char, ByVal c2 As Char) As Boolean
            Return Char.ToLower(c1) = Char.ToLower(c2)
            ' Another way (slower):
            ' return String.Compare("" + c1, "" + c2, true) == 0;
        End Function

        ''' <summary>The Function Get last word
        ''' </summary>
        ''' <param name="text">Parameter text As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:50 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetLastWord(ByVal text As String) As String
            Dim words As String() = text.Split(New Char() {" "c})
            If words.Length > 0 Then
                Return words(words.Length - 1)
            End If
            Return text
        End Function

        ''' <summary>The Function Remove last word
        ''' </summary>
        ''' <param name="text">Parameter text As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:54 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function RemoveLastWord(ByVal text As String) As String
            Dim lastWord As String = GetLastWord(text)
            ' Fix 2004-10-08: new length can be 0 for killing first word
            If text = lastWord Then
                Return ""
            ElseIf lastWord.Length = 0 OrElse text.Length = 0 OrElse text.Length - lastWord.Length - 1 <= 0 Then
                Return text
            Else
                Return text.Substring(0, text.Length - lastWord.Length - 1)
            End If
        End Function

        ''' <summary>The Function Get all spaces and tabs at beginning
        ''' </summary>
        ''' <param name="text">Parameter text As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:07:58 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetAllSpacesAndTabsAtBeginning(ByVal text As String) As String
            Dim ret As String = ""
            For pos As Integer = 0 To text.Length - 1
                If text(pos) = " "c OrElse text(pos) = Chr(9) Then
                    ret += text(pos)
                Else
                    Exit For
                End If
            Next
            ' for (pos)
            Return ret
        End Function

        ''' <summary>The Function Get tab depth
        ''' </summary>
        ''' <param name="text">Parameter text As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.Int32"/> As System.Int32
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:03 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetTabDepth(ByVal text As String) As Integer
            For textPos As Integer = 0 To text.Length - 1
                If text(textPos) <> Chr(9) Then
                    Return textPos
                End If
            Next
            Return text.Length
        End Function
        ' GetTabDepth(text)
        ''' <summary>
        ''' Check string word length
        ''' </summary>
        ''' <param name="originalString">Parameter originalString As <seealso cref= "System.String"/></param>
        ''' <param name="maxLength">Parameter maxLength Integer</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:07 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function CheckStringWordLength(ByVal originalString As String, ByVal maxLength As Integer) As String
            Dim splitted As String() = originalString.Split(New Char() {" "c})
            Dim ret As String = ""
            For Each word As String In splitted
                If word.Length <= maxLength Then
                    ret += word + " "
                Else
                    For i As Integer = 0 To CType(word.Length / maxLength - 1, Integer)
                        ret += word.Substring(i * maxLength, maxLength) + " "
                    Next
                    ' else
                End If
            Next
            ' foreach (word, splitted)
            Return ret.TrimEnd()
        End Function
        ' CheckStringWordLength(originalString, maxLength)
#End Region
#Region "Write data"
        ''' <summary>
        ''' Returns a string with the array data, byte array version.
        ''' </summary>
        ''' <param name="a">Parameter a <seealso cref =" system. array" /> As System. byte ()</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:20 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteArrayData(ByVal a As Byte()) As String
            Dim ret As String = ""
            If a IsNot Nothing Then
                For i As Integer = 0 To a.Length - 1
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + a(i).ToString()
                Next
            End If
            Return ret
        End Function
        ' WriteArrayData(a)
        ''' <summary>
        ''' Returns a string with the array data, int array version.
        ''' </summary>
        ''' <param name="a">Parameter a <seealso cref =" system. array" /> As System. integer ()</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:28 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteArrayData(ByVal a As Integer()) As String
            Dim ret As String = ""
            If a IsNot Nothing Then
                For i As Integer = 0 To a.Length - 1
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + a(i).ToString()
                Next
            End If
            Return ret
        End Function
        ' WriteArrayData(a)
        ''' <summary>
        ''' Returns a string with the array data, general array version.
        ''' </summary>
        ''' <param name="a">Parameter a As <seealso cref= "System.Array"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:32 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteArrayData(ByVal a As Array) As String
            Dim ret As String = ""
            If a IsNot Nothing Then
                For i As Integer = 0 To a.Length - 1
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + (IIf(a.GetValue(i) Is Nothing, "null", a.GetValue(i).ToString())).ToString
                Next
            End If
            Return ret
        End Function
        ' WriteArrayData(a)
        ''' <summary>
        ''' Returns a string with the array data, general array version
        ''' <para>with maxLength bounding (will return string with max. this</para>
        ''' <para>number of entries).</para>
        ''' </summary>
        ''' <param name="a">Parameter a As <seealso cref= "System.Array"/></param>
        ''' <param name="maxLength">Parameter maxLength Integer</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:36 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteArrayData(ByVal a As Array, ByVal maxLength As Integer) As String
            Dim ret As String = ""
            If a IsNot Nothing Then
                Dim i As Integer = 0
                While i < a.Length AndAlso i < maxLength
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + a.GetValue(i).ToString()
                    i += 1
                End While
            End If
            Return ret
        End Function
        ' WriteArrayData(a, maxLength)
        ''' <summary>
        ''' Returns a string with the array data, ArrayList version.
        ''' </summary>
        ''' <param name="a">Parameter a As <seealso cref= "System.Array"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:42 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteArrayData(ByVal a As ArrayList) As String
            Dim ret As String = ""
            If a IsNot Nothing Then
                For Each obj As Object In a
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + obj.ToString()
                Next
            End If
            Return ret
        End Function
        ' WriteArrayData(a)
        ''' <summary>
        ''' Returns a string with the array data, CollectionBase version.
        ''' </summary>
        ''' <param name="cb">Parameter cb Collection base</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:46 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteArrayData(ByVal cb As CollectionBase) As String
            Dim ret As String = ""
            If cb IsNot Nothing Then
                For Each obj As Object In cb
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + obj.ToString()
                Next
            End If
            Return ret
        End Function
        ' WriteArrayData(cb)
        ''' <summary>
        ''' Returns a string with the array data, StringCollection version.
        ''' </summary>
        Public Shared Function WriteArrayData(ByVal sc As StringCollection) As String
            Dim ret As String = ""
            If sc IsNot Nothing Then
                For Each s As String In sc
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + s
                Next
            End If
            Return ret
        End Function
        ' WriteArrayData(sc)
        ''' <summary>
        ''' Returns a string with the array data, enumerable class version.
        ''' </summary>
        ''' <param name="enumerableClass">Parameter enumerableClass IEnumerable</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:50 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteArrayData(ByVal enumerableClass As IEnumerable) As String
            Dim ret As String = ""
            If enumerableClass IsNot Nothing Then
                For Each obj As Object In enumerableClass
                    ret += (IIf(ret.Length = 0, "", ", ")).ToString + obj.ToString()
                Next
            End If
            Return ret
        End Function
        ' WriteArrayData(enumerableClass)
        ''' <summary>
        ''' Write into space string, useful for writing Parameters without
        ''' <para>knowing the length of each string, e.g. when writing numbers</para>
        ''' <para>(-1, 1.45, etc.). You can use this function to give all strings</para>
        ''' <para>the same width in a table. Maybe there is already a string function</para>
        ''' <para>for this, but I don't found any useful stuff.</para>
        ''' </summary>
        ''' <param name="msg">Parameter msg As <seealso cref= "System.String"/></param>
        ''' <param name="spaces">Parameter spaces Integer</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:08:55 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteIntoSpaceString(ByVal msg As String, ByVal spaces As Integer) As String
            ' Msg is already that long or longer?
            If msg.Length >= spaces Then
                Return msg
            End If
            ' Create string with number of specified spaces
            Dim ret As Char() = New Char(spaces - 1) {}
            ' Copy data
            Dim i As Integer
            For i = 0 To msg.Length - 1
                ret(i) = msg(i)
            Next
            For i = msg.Length To spaces - 1
                ret(i) = " "c
            Next
            ' Fill rest with spaces
            ' Return result
            Return New String(ret)
        End Function

        ''' <summary>The Function Write iso date
        ''' </summary>
        ''' <param name="_date">Parameter [date] Date time</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:09:13 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteIsoDate(ByVal _date As DateTime) As String
            Return _date.Year.ToString("00") + "-" + _date.Month.ToString("00") + "-" + _date.Day.ToString("00")
        End Function
        ' WriteIsoDate(date)
        ''' <summary>
        ''' Write Iso Date and time (Year-Month-Day Hour:Minute)
        ''' </summary>
        ''' <param name="_date">Parameter _date Date time</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:11:00 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteIsoDateAndTime(ByVal _date As DateTime) As String
            Return _date.Year.ToString("00") + "-" + _date.Month.ToString("00") + "-" + _date.Day.ToString("00") + " " + _date.Hour.ToString("00") + ":" + _date.Minute.ToString("00")
        End Function

        ''' <summary>The Function Write internet time
        ''' </summary>
        ''' <param name="time">Parameter time Date time</param>
        ''' <param name="daylightSaving">Parameter daylightSaving As <seealso cref= "System.Boolean"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:11:11 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteInternetTime(ByVal time As DateTime, ByVal daylightSaving As Boolean) As String
            Return "@" + (CSng(CInt((time.ToUniversalTime().AddHours(CType(IIf(daylightSaving, 1, 0), Double)).TimeOfDay.TotalSeconds * 100000 / (24 * 60 * 60)))) / 100.0F).ToString(NumberFormatInfo.InvariantInfo)
        End Function

#End Region
#Region "File stuff"
        ''' <summary>
        ''' Extracts filename from full path+filename, cuts of extension
        ''' <para>if cutExtension is true. Can be also used to cut of directories</para>
        ''' <para>from a path (only last one will remain).</para>
        ''' </summary>
        ''' <param name="pathFile">Parameter pathFile As <seealso cref= "System.String"/></param>
        ''' <param name="bnlCutExtension">Parameter bnlCutExtension As <seealso cref= "System.Boolean"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:11:35 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function ExtractFilename(ByVal pathFile As String, ByVal bnlCutExtension As Boolean) As String
            If pathFile Is Nothing Then
                Return ""
            End If
            Dim fileName As String() = pathFile.Split(New Char() {My.Resources.BackSlashText})
            If fileName.Length = 0 Then
                If bnlCutExtension Then
                    Return CutExtension(pathFile)
                End If
                Return pathFile
            End If
            ' if (fileName.Length)
            If bnlCutExtension Then
                Return CutExtension(fileName(fileName.Length - 1))
            End If
            Return fileName(fileName.Length - 1)
        End Function

        ''' <summary>
        ''' Get directory of path+File, if only a path is given we will cut off
        ''' <para>the last sub path!</para>
        ''' </summary>
        ''' <param name="pathFile">Parameter pathFile As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:12:03 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetDirectory(ByVal pathFile As String) As String
            If pathFile Is Nothing Then
                Return ""
            End If
            Dim i As Integer = pathFile.LastIndexOf(My.Resources.BackSlashText)
            If i >= 0 AndAlso i < pathFile.Length Then
                Return pathFile.Substring(0, i)
                ' Return directory
            End If
            ' No sub directory found (parent of some dir is "")
            Return ""
        End Function

        ''' <summary>
        ''' Same as GetDirectory(): Get directory of path+File,
        ''' <para>if only a path is given we will cut of the last sub path!</para>
        ''' </summary>
        ''' <param name="path">Parameter path As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:12:35 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function CutOneFolderOff(ByVal path As String) As String
            ' GetDirectory does exactly what we need!
            Return GetDirectory(path)
        End Function

        ''' <summary>
        ''' Splits a path into all parts of its directories,
        ''' <para>e.g. "maps\\sub\\kekse" becomes</para>
        ''' <para>{"maps\\sub\\kekse","maps\\sub","maps"}</para>
        ''' </summary>
        ''' <param name="path">Parameter path As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.array"/> As System.array
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:12:44 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function SplitDirectories(ByVal path As String) As String()
            Dim localList As New ArrayList()
            localList.Add(path)
            Do
                path = CutOneFolderOff(path)
                If path.Length > 0 Then
                    localList.Add(path)
                End If
            Loop While path.Length > 0

            Return DirectCast(localList.ToArray(GetType(String)), String())
        End Function

        ''' <summary>
        ''' Remove first directory of path (if one exists).
        ''' <para>e.g. "maps\\mymaps\\hehe.map" becomes "mymaps\\hehe.map"</para>
        ''' <para>Also used to cut first folder off, especially useful for relative</para>
        ''' <para>paths. e.g. "maps\\test" becomes "test"</para>
        ''' </summary>
        ''' <param name="path">Parameter path As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:12:51 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function RemoveFirstDirectory(ByVal path As String) As String
            Dim i As Integer = path.IndexOf(My.Resources.BackSlashText)
            If i >= 0 AndAlso i < path.Length Then
                Return path.Substring(i + 1)
                ' Return rest of path
            End If
            ' No first directory found, just return original path
            Return path
        End Function

        ''' <summary>
        ''' Helper function for saving, we check if path starts with same as
        ''' <para>our application. If so, better use relative path, then we can use</para>
        ''' <para>them even if application is moved or copied over network!</para>
        ''' </summary>
        ''' <param name="fullPath">Parameter fullPath As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:12:58 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function TryToUseRelativePath(ByVal fullPath As String) As String
            If fullPath IsNot Nothing AndAlso fullPath.StartsWith(Application.StartupPath) Then
                Return fullPath.Remove(0, Application.StartupPath.Length + 1)
                '+1 to remove '/' too
            End If
            ' Startup path not found, so either its relative already or
            ' we can't use relative path that easy!
            Return fullPath
        End Function

        ''' <summary>
        ''' Check if a folder is a direct sub folder of a main folder.
        ''' <para>True is only returned if this is a direct sub folder, not if</para>
        ''' <para>it is some sub folder few levels below.</para>
        ''' </summary>
        ''' <param name="subFolder">Parameter subFolder As <seealso cref= "System.String"/></param>
        ''' <param name="mainFolder">Parameter mainFolder As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:13:05 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function IsDirectSubFolder(ByVal subFolder As String, ByVal mainFolder As String) As Boolean
            ' First check if subFolder is really a sub folder of mainFolder
            If subFolder IsNot Nothing AndAlso subFolder.StartsWith(mainFolder) Then
                ' Same order?
                If subFolder.Length < mainFolder.Length + 1 Then
                    Return False
                    ' Then it ain't a sub folder!
                End If
                ' Ok, now check if this is direct sub folder or some sub folder of mainFolder sub folder
                Dim folder As String = subFolder.Remove(0, mainFolder.Length + 1)
                For i As Integer = 0 To folder.Length - 1
                    If folder(i) = My.Resources.BackSlashText Then
                        Return False
                    End If
                Next
                ' Check if this is really a direct sub folder
                ' No, this is a sub folder of mainFolder sub folder
                ' Ok, this is a direct sub folder of mainFolder!
                Return True
            End If
            ' if (subFolder)
            ' Not even any sub folder!
            Return False
        End Function

        ''' <summary>
        ''' Cut of extension, e.g. "hi.txt" becomes "hi"
        ''' </summary>
        ''' <param name="file">Parameter file As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:13:22 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function CutExtension(ByVal file As String) As String
            If file Is Nothing Then
                Return ""
            End If
            Dim l As Integer = file.LastIndexOf("."c)
            If l > 0 Then
                Return file.Remove(l, file.Length - l)
            End If
            Return file
        End Function

        ''' <summary>
        ''' Get extension (the stuff behind that '.'),
        ''' <para>e.g. "test.bmp" will return "bmp"</para>
        ''' </summary>
        ''' <param name="file">Parameter file As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:13:31 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetExtension(ByVal file As String) As String
            If file Is Nothing Then
                Return ""
            End If
            Dim l As Integer = file.LastIndexOf("."c)
            If l > 0 AndAlso l < file.Length Then
                Return file.Remove(0, l + 1)
            End If
            Return file
        End Function

#End Region
#Region "String splitting and getting it back together"
        ''' <summary>
        ''' Performs basically the same job as String.Split, but does
        ''' <para>trim all parts, no empty parts are returned, e.g.</para>
        ''' <para>"hi  there" returns "hi", "there", String.Split would return</para>
        ''' <para>"hi", "", "there".</para>
        ''' </summary>
        ''' <param name="text">Parameter text As <seealso cref= "System.String"/></param>
        ''' <param name="separator">Parameter separator As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.array"/> As System.array
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:13:46 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function SplitAndTrim(ByVal text As String, ByVal separator As Char) As String()
            Dim ret As New ArrayList()
            Dim splitted As String() = text.Split(New Char() {separator})
            For Each s As String In splitted
                If s.Length > 0 Then
                    ret.Add(s)
                End If
            Next
            Return DirectCast(ret.ToArray(GetType(String)), String())
        End Function

        ''' <summary>
        ''' Splits a multi line string to several strings and
        ''' <para>returns the result as a string array.</para>
        ''' <para>Will also remove any \r, \n or space character</para>
        ''' <para>at the end of each line!</para>
        ''' </summary>
        ''' <param name="text">Parameter text As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.array"/> As System.array
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:14:48 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function SplitMultiLineText(ByVal text As String) As String()
            Dim ret As New ArrayList()
            ' Supports any format, only \r, only \n, normal \n\r,
            ' crazy \r\n or even mixed \n\r with any format
            Dim splitted1 As String() = text.Split(New Char() {Chr(10)})
            Dim splitted2 As String() = text.Split(New Char() {Chr(13)})
            Dim splitted As String() = Nothing
            If (splitted1.Length >= splitted2.Length) Then
                splitted = splitted1
            Else
                splitted = splitted2
            End If
            For Each s As String In splitted
                ' Never add any \r or \n to the single lines
                If s.EndsWith("" & Chr(13) & "") OrElse s.EndsWith("" & Chr(10) & "") Then
                    ret.Add(s.Substring(0, s.Length - 1))
                ElseIf s.StartsWith("" & Chr(10) & "") OrElse s.StartsWith("" & Chr(13) & "") Then
                    ret.Add(s.Substring(1))
                Else
                    ret.Add(s)
                End If
            Next
            ' foreach (s, splitted)
            Return DirectCast(ret.ToArray(GetType(String)), String())
        End Function

        ''' <summary>The Function Build string from lines
        ''' </summary>
        ''' <param name="lines">Parameter lines <seealso cref =" system. array" /> As System. string ()</param>
        ''' <param name="startLine">Parameter startLine Integer</param>
        ''' <param name="startOffset">Parameter startOffset Integer</param>
        ''' <param name="endLine">Parameter endLine Integer</param>
        ''' <param name="endOffset">Parameter endOffset Integer</param>
        ''' <param name="separator">Parameter separator As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:14:59 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function BuildStringFromLines(ByVal lines As String(), ByVal startLine As Integer, ByVal startOffset As Integer, ByVal endLine As Integer, ByVal endOffset As Integer, ByVal separator As String) As String
            ' Check if all values are in range (correct if not)
            If startLine >= lines.Length Then
                startLine = lines.Length - 1
            End If
            If endLine >= lines.Length Then
                endLine = lines.Length - 1
            End If
            If startLine < 0 Then
                startLine = 0
            End If
            If endLine < 0 Then
                endLine = 0
            End If
            If startOffset >= lines(startLine).Length Then
                startOffset = lines(startLine).Length - 1
            End If
            If endOffset >= lines(endLine).Length Then
                endOffset = lines(endLine).Length - 1
            End If
            If startOffset < 0 Then
                startOffset = 0
            End If
            If endOffset < 0 Then
                endOffset = 0
            End If

            Dim builder As New StringBuilder((endLine - startLine) * 80)
            For lineNumber As Integer = startLine To endLine
                If lineNumber = startLine Then
                    builder.Append(lines(lineNumber).Substring(startOffset))
                ElseIf lineNumber = endLine Then
                    builder.Append(lines(lineNumber).Substring(0, endOffset + 1))
                Else
                    builder.Append(lines(lineNumber))
                End If

                If lineNumber <> endLine Then
                    builder.Append(separator)
                End If
            Next
            ' for (lineNumber)
            Return builder.ToString()
        End Function

        ''' <summary>The Function Build string from lines
        ''' </summary>
        ''' <param name="lines">Parameter lines <seealso cref =" system. array" /> As System. string ()</param>
        ''' <param name="separator">Parameter separator As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:15:06 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function BuildStringFromLines(ByVal lines As String(), ByVal separator As String) As String
            Dim builder As New StringBuilder(lines.Length * 80)
            For lineNumber As Integer = 0 To lines.Length - 1
                builder.Append(lines(lineNumber))
                If lineNumber <> lines.Length - 1 Then
                    builder.Append(separator)
                End If
            Next
            ' for (lineNumber)
            Return builder.ToString()
        End Function

        ''' <summary>The Function Build string from lines
        ''' </summary>
        ''' <param name="lines">Parameter lines <seealso cref =" system. array" /> As System. string ()</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:15:27 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function BuildStringFromLines(ByVal lines As String()) As String
            Return BuildStringFromLines(lines, NewLine)
        End Function

        ''' <summary>The Function Build string from lines
        ''' </summary>
        ''' <param name="lines">Parameter lines <seealso cref =" system. array" /> As System. string ()</param>
        ''' <param name="startLine">Parameter startLine Integer</param>
        ''' <param name="endLine">Parameter endLine Integer</param>
        ''' <param name="separator">Parameter separator As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:15:35 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function BuildStringFromLines(ByVal lines As String(), ByVal startLine As Integer, ByVal endLine As Integer, ByVal separator As String) As String
            ' Check if all values are in range (correct if not)
            If startLine < 0 Then
                startLine = 0
            End If
            If endLine < 0 Then
                endLine = 0
            End If
            If startLine >= lines.Length Then
                startLine = lines.Length - 1
            End If
            If endLine >= lines.Length Then
                endLine = lines.Length - 1
            End If

            Dim builder As New StringBuilder((endLine - startLine) * 80)
            For lineNumber As Integer = startLine To endLine
                builder.Append(lines(lineNumber))
                If lineNumber <> endLine Then
                    builder.Append(separator)
                End If
            Next
            ' for (lineNumber)
            Return builder.ToString()
        End Function

        ''' <summary>Enum [CutModes].
        ''' </summary>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' 	<item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:15:43 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Enum CutModes
            Begin
            [End]
            BothEnds
        End Enum

        ''' <summary>The Function Maximum string length
        ''' </summary>
        ''' <param name="originalString">Parameter originalString As <seealso cref= "System.String"/></param>
        ''' <param name="maxLength">Parameter maxLength Integer</param>
        ''' <param name="cutMode">Parameter cutMode Cut modes</param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:15:54 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function MaxStringLength(ByVal originalString As String, ByVal maxLength As Integer, ByVal cutMode As CutModes) As String
            If originalString.Length <= maxLength Then
                Return originalString
            End If

            If cutMode = CutModes.Begin Then
                Return originalString.Substring(originalString.Length - maxLength, maxLength)
            ElseIf cutMode = CutModes.[End] Then
                Return originalString.Substring(0, maxLength)
            Else
                Return originalString.Substring(CType((originalString.Length - maxLength) / 2, Integer), maxLength)
                ' logic: if ( cutMode == CutModes.BothEnds )
            End If
        End Function

        ''' <summary>
        ''' Get left part of everything to the left of the first
        ''' <para>occurrence of a character.</para>
        ''' </summary>
        ''' <param name="sourceString">Parameter sourceString As <seealso cref= "System.String"/></param>
        ''' <param name="ch">Parameter ch As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:16:01 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetLeftPartAtFirstOccurence(ByVal sourceString As String, ByVal ch As Char) As String
            Dim index As Integer = sourceString.IndexOf(ch)
            If index = -1 Then
                Return sourceString
            End If

            Return sourceString.Substring(0, index)
        End Function

        ''' <summary>
        ''' Get right part of everything to the right of the first
        ''' <para>occurrence of a character.</para>
        ''' </summary>
        ''' <param name="sourceString">Parameter sourceString As <seealso cref= "System.String"/></param>
        ''' <param name="ch">Parameter ch As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:16:09 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetRightPartAtFirstOccurence(ByVal sourceString As String, ByVal ch As Char) As String
            Dim index As Integer = sourceString.IndexOf(ch)
            If index = -1 Then
                Return ""
            End If

            Return sourceString.Substring(index + 1)
        End Function

        ''' <summary>
        ''' Get left part of everything to the left of the last
        ''' <para>occurrence of a character.</para>
        ''' </summary>
        ''' <param name="sourceString">Parameter sourceString As <seealso cref= "System.String"/></param>
        ''' <param name="ch">Parameter ch As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:16:27 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetLeftPartAtLastOccurence(ByVal sourceString As String, ByVal ch As Char) As String
            Dim index As Integer = sourceString.LastIndexOf(ch)
            If index = -1 Then
                Return sourceString
            End If

            Return sourceString.Substring(0, index)
        End Function

        ''' <summary>
        ''' Get right part of everything to the right of the last
        ''' <para>occurrence of a character.</para>
        ''' </summary>
        ''' <param name="sourceString">Parameter sourceString As <seealso cref= "System.String"/></param>
        ''' <param name="ch">Parameter ch As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:16:38 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function GetRightPartAtLastOccurence(ByVal sourceString As String, ByVal ch As Char) As String
            Dim index As Integer = sourceString.LastIndexOf(ch)
            If index = -1 Then
                Return sourceString
            End If

            Return sourceString.Substring(index + 1)
        End Function

        ''' <summary>The Function Create password string
        ''' </summary>
        ''' <param name="originalString">Parameter originalString As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:16:46 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function CreatePasswordString(ByVal originalString As String) As String
            Dim passwordString As String = ""
            For i As Integer = 0 To originalString.Length - 1
                passwordString += "*"
            Next
            Return passwordString
        End Function

        ''' <summary>
        ''' Helper function to convert letter to lowercase. Could someone
        ''' <para>tell me the reason why there is no function for that in char?</para>
        ''' </summary>
        ''' <param name="letter">Parameter letter As <seealso cref= "System.Char"/></param>
        ''' <returns>Char
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:16:55 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function ToLower(ByVal letter As Char) As Char
            Return CChar(letter.ToString().ToLower()(0))
        End Function

        ''' <summary>
        ''' Helper function to convert letter to uppercase. Could someone
        ''' <para>tell me the reason why there is no function for that in char?</para>
        ''' </summary>
        ''' <param name="letter">Parameter letter As <seealso cref= "System.Char"/></param>
        ''' <returns>Char
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:17:03 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function ToUpper(ByVal letter As Char) As Char
            Return CChar(letter.ToString().ToUpper()(0))
        End Function

        ''' <summary>
        ''' Helper function to check if this is an lowercase letter.
        ''' </summary>
        ''' <param name="letter">Parameter letter As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:17:12 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function IsLowercaseLetter(ByVal letter As Char) As Boolean
            Return letter = ToLower(letter)
        End Function

        ''' <summary>
        ''' Helper function to check if this is an uppercase letter.
        ''' </summary>
        ''' <param name="letter">Parameter letter As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:17:20 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function IsUppercaseLetter(ByVal letter As Char) As Boolean
            Return letter = ToUpper(letter)
        End Function

        ''' <summary>
        ''' Helper function for SplitFunctionNameToWordString to detect
        ''' <para>abbreviations in the function name</para>
        ''' </summary>
        ''' <param name="functionString">Parameter functionString As <seealso cref= "System.String"/></param>
        ''' <param name="startPos">Parameter startPos Integer</param>
        ''' <returns><seealso cref="System.Int32"/> As System.Int32
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:17:26 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Private Shared Function GetAbbreviationLengthInFunctionName(ByVal functionString As String, ByVal startPos As Integer) As Integer
            Dim abbreviation As String = ""
            For pos As Integer = startPos To functionString.Length - 1
                ' Go through string until we reach a lower letter or it ends
                ' Quit if its not an uppercase letter
                If StringHelper.IsUppercaseLetter(functionString(pos)) = False Then
                    Exit For
                End If
                ' Else just add letter
                abbreviation += functionString(pos)
            Next
            ' for (pos)
            ' Abbreviation has to be at least 2 letters long.
            If abbreviation.Length >= 2 Then
                ' If not at end of functionName, last letter belongs to next name,
                ' e.g. "TW" is not a abbreviation in "HiMrTWhatsUp",
                ' "AB" isn't one either in "IsABall",
                ' but "PQ" is in "PQList" and "AB" is in "MyAB"
                If startPos + abbreviation.Length >= functionString.Length Then
                    Return abbreviation.Length
                    ' Ok, then return full abbreviation length
                End If
                ' Else return length - 1 because of next word
                Return abbreviation.Length - 1
            End If
            ' if (abbreviation.Length)
            ' No Abbreviation, just return 1
            Return 1
        End Function

        ''' <summary>
        ''' Checks if letter is space ' ' or any punctuation (. , : ; ' " ! ?)
        ''' </summary>
        ''' <param name="letter">Parameter letter As <seealso cref= "System.Char"/></param>
        ''' <returns><seealso cref="System.Boolean"/> As System.Boolean <c> True</c> if success, <c>False</c> otherwise.
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:17:33 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function IsSpaceOrPunctuation(ByVal letter As Char) As Boolean
            Return letter = " "c OrElse letter = "."c OrElse letter = ","c OrElse letter = ":"c OrElse letter = ";"c OrElse letter = "'"c OrElse letter = """"c OrElse letter = "!"c OrElse letter = "?"c OrElse letter = "*"c
        End Function

        ''' <summary>
        ''' Splits a function name to words, e.g.
        ''' <para>"MakeDamageOnUnit" gets "Make damage on unit".</para>
        ''' <para>Will also detect abbreviation like TCP and leave them</para>
        ''' <para>intact, e.g. "CreateTCPListener" gets "Create TCP listener".</para>
        ''' </summary>
        ''' <param name="functionString">Parameter functionString As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:17:39 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function SplitFunctionNameToWordString(ByVal functionString As String) As String
            If functionString Is Nothing OrElse functionString.Length = 0 Then
                Return ""
            End If

            Dim ret As String = ""
            For pos As Integer = 0 To functionString.Length - 1
                ' Go through functionString and find big letters!
                Dim letter As Char = functionString(pos)
                ' First letter is always big!
                If pos = 0 OrElse pos = 1 AndAlso StringHelper.IsUppercaseLetter(functionString(1)) AndAlso StringHelper.IsUppercaseLetter(functionString(0)) OrElse pos = 2 AndAlso StringHelper.IsUppercaseLetter(functionString(2)) AndAlso StringHelper.IsUppercaseLetter(functionString(1)) AndAlso StringHelper.IsUppercaseLetter(functionString(0)) Then
                    ret += StringHelper.ToUpper(letter)
                ElseIf StringHelper.IsUppercaseLetter(letter) AndAlso StringHelper.IsSpaceOrPunctuation(letter) = False AndAlso ret.EndsWith(" ") = False Then
                    ' Found uppercase letter?
                    'also support numbers and other symbols not lower/upper letter:
                    'StringHelper.IsLowercaseLetter(letter) == false &&
                    ' But don't allow space or any punctuation (. , : ; ' " ! ?)
                    ' Could be new word, but we have to check if its an abbreviation
                    Dim abbreviationLength As Integer = GetAbbreviationLengthInFunctionName(functionString, pos)
                    ' Found valid abbreviation?
                    If abbreviationLength > 1 Then
                        ' Then add it
                        ret += " " + functionString.Substring(pos, abbreviationLength)
                        ' And advance pos (abbreviation is longer than 1 letter)
                        pos += abbreviationLength - 1
                    Else
                        ret += " " + StringHelper.ToLower(letter)
                        ' if (abbreviationLength)
                        ' Else just add new word (in lower letter)
                    End If
                Else
                    ret += letter
                    ' else if
                    ' Just add letter
                End If
            Next
            ' for (pos)
            Return ret
        End Function

#End Region
#Region "Kb/mb name generator"
        ''' <summary>
        ''' Write bytes, KB, MB, GB, TB message.
        ''' <para>1 KB = 1024 Bytes</para>
        ''' <para>1 MB = 1024 KB = 1048576 Bytes</para>
        ''' <para>1 GB = 1024 MB = 1073741824 Bytes</para>
        ''' <para>1 TB = 1024 GB = 1099511627776 Bytes</para>
        ''' <para>E.g. 100 will return "100 Bytes"</para>
        ''' <para>2048 will return "2.00 KB"</para>
        ''' <para>2500 will return "2.44 KB"</para>
        ''' <para>1534905 will return "1.46 MB"</para>
        ''' <para>23045904850904 will return "20.96 TB"</para>
        ''' </summary>
        ''' <param name="num">Parameter num As <seealso cref= "System.Long"/></param>
        ''' <param name="decimalSeperator">Parameter decimalSeperator As <seealso cref= "System.String"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:17:58 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteKbMbGbNumber(ByVal num As Long, ByVal decimalSeperator As String) As String
            If num < 0 Then
                Return "-" + WriteKbMbGbNumber(-num)
            End If
            If num <= 999 Then
                Return num.ToString + " Bytes"
            End If
            If num <= 999 * 1024 Then
                Dim fKB As Double = CDbl(num) / 1024
                Return CInt(fKB).ToString + decimalSeperator + (CInt((fKB * 100.0F)) Mod 100).ToString("00") + " KB"
            End If
            ' if
            If num <= 999 * 1024 * 1024 Then
                Dim fMB As Double = CDbl(num) / (1024 * 1024)
                Return CInt(fMB).ToString + decimalSeperator + (CInt((fMB * 100.0F)) Mod 100).ToString("00") + " MB"
            End If
            ' if
            ' this is very big ^^ will not fit into int
            'If num <= 999 * 1024 * 1024 * 1024 Then
            '	Dim fGB As Double = CDbl(num) / (1024 * 1024 * 1024)
            '	Return CInt(fGB).ToString + decimalSeperator + (CInt((fGB * 100F)) Mod 100).ToString("00") + " GB"
            'End If
            '' if
            ''if ( num <= 999*1024*1024*1024*1024 )
            ''{
            'Dim fTB As Double = CDbl(num) / (1024 * 1024 * 1024 * 1024)
            'Return CInt(fTB).ToString + decimalSeperator + (CInt((fTB * 100F)) Mod 100).ToString("00") + " TB"
            '} // if
            Return Nothing
        End Function

        ''' <summary>
        ''' Write bytes, KB, MB, GB, TB message.
        ''' <para>1 KB = 1024 Bytes</para>
        ''' <para>1 MB = 1024 KB = 1048576 Bytes</para>
        ''' <para>1 GB = 1024 MB = 1073741824 Bytes</para>
        ''' <para>1 TB = 1024 GB = 1099511627776 Bytes</para>
        ''' <para>E.g. 100 will return "100 Bytes"</para>
        ''' <para>2048 will return "2.00 KB"</para>
        ''' <para>2500 will return "2.44 KB"</para>
        ''' <para>1534905 will return "1.46 MB"</para>
        ''' <para>23045904850904 will return "20.96 TB"</para>
        ''' </summary>
        ''' <param name="num">Parameter num As <seealso cref= "System.Long"/></param>
        ''' <returns><seealso cref="System.String"/> As System.String
        ''' </returns>
        ''' <remarks>
        ''' 	<para><b>History:</b></para>
        ''' <list type="table">
        ''' 	<listheader>
        ''' 		<term>Term</term>
        ''' 		<description>Description</description>
        ''' 	</listheader>
        ''' <item>
        ''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:18:57 AM</para></term>
        ''' 		<description>Created XML Comment. </description>
        ''' 	</item>
        ''' </list>
        ''' </remarks>
        ''' <example>
        ''' </example>
        Public Shared Function WriteKbMbGbNumber(ByVal num As Long) As String
            Dim decimalSeperator As String = CultureInfo.CurrentCulture.NumberFormat.CurrencyDecimalSeparator
            Return WriteKbMbGbNumber(num, decimalSeperator)
        End Function

#End Region
#Region "Unit Testing"
#If UNIT_TESTING Then

		''' <summary>The Sub Test is in list
		''' </summary>
		''' <remarks>
		''' 	<para><b>History:</b></para>
		''' <list type="table">
		''' 	<listheader>
		''' 		<term>Term</term>
		''' 		<description>Description</description>
		''' 	</listheader>
		''' <item>
		''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:19:24 AM</para></term>
		''' 		<description>Created XML Comment. </description>
		''' 	</item>
		''' </list>
		''' </remarks>
		''' <example>
		''' </example>
		Public Sub TestIsInList()
			Assert.IsTrue(IsInList("whats", New String() {"hi", "whats", "up?"}, False))
			Assert.IsFalse(IsInList("no way", New String() {"omg", "no no", "there is no way!"}, False))
		End Sub

		''' <summary>The Sub Test split string and combine again
		''' </summary>
		''' <remarks>
		''' 	<para><b>History:</b></para>
		''' <list type="table">
		''' 	<listheader>
		''' 		<term>Term</term>
		''' 		<description>Description</description>
		''' 	</listheader>
		''' <item>
		''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:19:38 AM</para></term>
		''' 		<description>Created XML Comment. </description>
		''' 	</item>
		''' </list>
		''' </remarks>
		''' <example>
		''' </example>
		Public Sub TestSplitStringAndCombineAgain()
			Dim testText As String = "Imports System;" & Chr(13) & "" & Chr(10) & "" & Chr(13) & "" & Chr(10) & "namespace TestVs2005" & Chr(13) & "" & Chr(10) & "{" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "public class Form1 : System.Windows.Forms.Form" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "{" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "''' <summary>" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "''' The main entry point for the application." & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "''' </summary>" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "[STAThread]" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "static void Main() " & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "{" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "" & Chr(9) & "Application.Run(new Form1());" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "}" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "}" & Chr(13) & "" & Chr(10) & "}"
			' Test splitting lines and combine them back together
			Dim lines As String() = SplitMultiLineText(testText)
			Assert.IsTrue(lines.Length > 0, "no lines were returned")
			Dim reconstructedText As String = BuildStringFromLines(lines)
			Assert.AreEqual(testText, reconstructedText, "testText is not equal to reconstructedText")

			' Also test other functions
			Dim words As String() = SplitAndTrim(testText, " "C)
			Assert.AreEqual(words.Length, CountWords(testText), "words.Length")
			Assert.AreEqual(testText, BuildStringFromLines(words, " "))
			' Call with some invalid values
			BuildStringFromLines(words, 1, -3, 4, 6, " ")
			BuildStringFromLines(words, 1, 3, 400, 6, " ")
			BuildStringFromLines(words, 1, 3, 4, 600, " ")
			' Check is we can build a part back together
			' Check if we can build a part back together
			Assert.AreEqual(testText.Substring(10, 20), BuildStringFromLines(lines, 0, 10, 2, 12, NewLine))

			' Get section code and check if we got everything right
			Assert.AreEqual("static void Main() " & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "{" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "" & Chr(9) & "Application.Run(new Form1());" & Chr(13) & "" & Chr(10) & "" & Chr(9) & "" & Chr(9) & "}", BuildStringFromLines(lines, 10, 2, 13, 3, NewLine))

			' Also check if we change some line we still got the same
			' number of resulting lines.
			lines(13) += " ' Test comment"
			Assert.AreEqual(lines.Length, SplitMultiLineText(BuildStringFromLines(lines, NewLine)).Length)
		End Sub

		''' <summary>The Sub Test split multi line text
		''' </summary>
		''' <remarks>
		''' 	<para><b>History:</b></para>
		''' <list type="table">
		''' 	<listheader>
		''' 		<term>Term</term>
		''' 		<description>Description</description>
		''' 	</listheader>
		''' <item>
		''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:20:05 AM</para></term>
		''' 		<description>Created XML Comment. </description>
		''' 	</item>
		''' </list>
		''' </remarks>
		''' <example>
		''' </example>
		Public Sub TestSplitMultiLineText()
			Assert.AreEqual(4, StringHelper.SplitMultiLineText("test" & Chr(13) & "" & Chr(10) & "now an empty lie" & Chr(13) & "" & Chr(10) & "" & Chr(13) & "" & Chr(10) & "thats it").Length)
			' Test few empty lines
			Assert.AreEqual(6, StringHelper.SplitMultiLineText("hi" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(10) & "" & Chr(13) & "there" & Chr(10) & "").Length)
			' Test all combination of '\r' and '\n'
			Assert.AreEqual(2, StringHelper.SplitMultiLineText("test1" + Chr(13) + "test2").Length)
			Assert.AreEqual(2, StringHelper.SplitMultiLineText("test1" + Chr(10) + "test2").Length)
			Assert.AreEqual(2, StringHelper.SplitMultiLineText("test1" + "" & Chr(10) & "" & Chr(13) & "" + "test2").Length)
			Assert.AreEqual(2, StringHelper.SplitMultiLineText("test1" + "" & Chr(13) & "" & Chr(10) & "" + "test2").Length)
			' Also test if mixing normal "\n\r" with '\r' or '\n'
			Assert.AreEqual(3, StringHelper.SplitMultiLineText("test1" + Chr(10) + "" + Chr(13) + "test2" + Chr(13) + "test3").Length)
			Assert.AreEqual(3, StringHelper.SplitMultiLineText("test1" + Chr(10) + "" + Chr(13) + "test2" + Chr(10) + "test3").Length)
		End Sub

		''' <summary>The Sub Test get tab depth
		''' </summary>
		''' <remarks>
		''' 	<para><b>History:</b></para>
		''' <list type="table">
		''' 	<listheader>
		''' 		<term>Term</term>
		''' 		<description>Description</description>
		''' 	</listheader>
		''' <item>
		''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:20:13 AM</para></term>
		''' 		<description>Created XML Comment. </description>
		''' 	</item>
		''' </list>
		''' </remarks>
		''' <example>
		''' </example>
		Public Sub TestGetTabDepth()
			Assert.AreEqual(4, StringHelper.GetTabDepth("" & Chr(9) & "" & Chr(9) & "" & Chr(9) & "" & Chr(9) & "Whats up?"))
		End Sub

		''' <summary>The Sub Test is lowercase or uppercase letter
		''' </summary>
		''' <remarks>
		''' 	<para><b>History:</b></para>
		''' <list type="table">
		''' 	<listheader>
		''' 		<term>Term</term>
		''' 		<description>Description</description>
		''' 	</listheader>
		''' <item>
		''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:20:20 AM</para></term>
		''' 		<description>Created XML Comment. </description>
		''' 	</item>
		''' </list>
		''' </remarks>
		''' <example>
		''' </example>
		Public Sub TestIsLowercaseOrUppercaseLetter()
			Assert.AreEqual(True, IsLowercaseLetter("u"C))
			Assert.AreEqual(True, IsUppercaseLetter("U"C))
			' Well, numbers don't care if they upper or lower letters.
			Assert.AreEqual(True, IsLowercaseLetter("3"C))
			Assert.AreEqual(True, IsUppercaseLetter("3"C))
		End Sub

		''' <summary>The Sub Test split function name to word string
		''' </summary>
		''' <remarks>
		''' 	<para><b>History:</b></para>
		''' <list type="table">
		''' 	<listheader>
		''' 		<term>Term</term>
		''' 		<description>Description</description>
		''' 	</listheader>
		''' <item>
		''' 		<term>Developer: Danny C. McNaught<para>Developer Company: EDS</para> <para>Developer Phone: (919) 325-7311</para> <para>Developer Email: danny.mcnaught@eds.com</para> <para>Developed on: W2PZZ50H01</para> <para>Date: 9/10/2007</para><para>Time: 7:20:26 AM</para></term>
		''' 		<description>Created XML Comment. </description>
		''' 	</item>
		''' </list>
		''' </remarks>
		''' <example>
		''' </example>
		Public Sub TestSplitFunctionNameToWordString()
			Assert.AreEqual("Make damage on unit", SplitFunctionNameToWordString("MakeDamageOnUnit"))
			Assert.AreEqual("This is a test", SplitFunctionNameToWordString("ThisIsATest"))
			Assert.AreEqual("Create TCP listener", SplitFunctionNameToWordString("CreateTCPListener"))
			Assert.AreEqual("Lower letter test", SplitFunctionNameToWordString("lowerLetterTest"))
			Assert.AreEqual("Test 3D render function", SplitFunctionNameToWordString("Test3DRenderFunction"))
			Assert.AreEqual("Check if CD is inserted", SplitFunctionNameToWordString("CheckIfCDIsInserted"))

			' Test with text that already got spaces (we expect same stuff returned)
			Assert.AreEqual("Ha ha, I have spaces already", SplitFunctionNameToWordString("ha ha, I have spaces already"))
			' Test mixed text
			Assert.AreEqual("Hey what means What the hell?", SplitFunctionNameToWordString("Hey what means WhatTheHell?"))

			' Test some crazy strings to test if we get no exceptions
			SplitFunctionNameToWordString("" & Chr(0) & "" & Chr(9) & "" & Chr(10) & "" & Chr(13) & "aoeu" & Chr(8) & "" & Chr(9) & "")
			SplitFunctionNameToWordString("@#%#@$<RRROEU<Y$G SINDTBRPI""'45453'")
		End Sub
		' TestSplitFunctionNameToWordString()
#End If
#End Region
    End Class
    ' class StringHelper
End Namespace